home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 2 / Apprentice-Release2.iso / Source Code / C++ / Applications / Nuntius 1.2 / src / Nuntius / UArticleCache.h < prev    next >
Encoding:
Text File  |  1994-03-06  |  758 b   |  33 lines  |  [TEXT/MPS ]

  1. // Copyright © 1992 Peter Speck, speck@dat.ruc.dk. All rights reserved.
  2. // UArticleCache.h
  3.  
  4. #define __UARTICLECACHE__
  5.  
  6. #ifndef __UPTROBJECT__
  7. #include "UPtrObject.h"
  8. #endif
  9.  
  10. class TArticle;
  11.  
  12. class PArticleCache : public PPtrObject
  13. {
  14.     public:
  15.         TArticle *GetArticle(const CStr255 &dotName, long articleID);
  16.         void ReturnArticle(TArticle *article);
  17.         // obs: TArticles cannot be discarded as others may have refs to it
  18.         
  19.         void DebugDump();
  20.         PArticleCache();
  21.         void IArticleCache();
  22.         ~PArticleCache();
  23.     private:
  24.         TList *fArticleList;
  25.         TLongintList *fRefCountList; // ref count for garbage collector
  26.  
  27.         void DiscardObject(TObject *obj); // may not be called
  28. };
  29.  
  30. extern PArticleCache *gArticleCache;
  31. void InitUArticleCache();
  32. void CloseDownUArticleCache();
  33.